/*
 * This program is free software: you can redistribute it and/or modify it under the terms of the 
 * GNU Affero General Public License as published by the Free Software Foundation, either version 3 
 * of the License, or (at your option) any later version.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3, 
 * the Appropriate Legal Notices must display the following words on all interactive user interfaces: 
 * "Copyright (C) 2005-2011 SplendidCRM Software, Inc. All rights reserved."
 */

var backgroundPage = new Object();
var chrome         = new Object();
chrome.extension   = new Object();
chrome.extension.getBackgroundPage = function()
{
	return backgroundPage;
}

try
{
	// Storage.js
	backgroundPage.SplendidStorage              = SplendidStorage;
	// Login.js
	backgroundPage.GetUserID                    = GetUserID;
	backgroundPage.GetUserName                  = GetUserName;
	backgroundPage.GetTeamID                    = GetTeamID;
	backgroundPage.GetTeamName                  = GetTeamName;
	backgroundPage.GetUserLanguage              = GetUserLanguage;
	backgroundPage.GetUserProfile               = GetUserProfile;
	backgroundPage.IsAuthenticated              = IsAuthenticated;
	backgroundPage.Login                        = Login;
	backgroundPage.AuthenticatedMethod          = AuthenticatedMethod;
	backgroundPage.IsOnline                     = IsOnline;
	// Credentials.js
	backgroundPage.GetIsOffline                 = GetIsOffline;
	backgroundPage.GetEnableOffline             = GetEnableOffline;
	// SplendidCache.js
	backgroundPage.SplendidCache                = SplendidCache;
	// AutoComplete.js
	backgroundPage.AutoComplete_ModuleMethod    = AutoComplete_ModuleMethod;
	// Logout.js
	backgroundPage.Logout                       = Logout;
	// Terminology.js
	backgroundPage.Terminology_SetTerm          = Terminology_SetTerm;
	backgroundPage.Terminology_SetListTerm      = Terminology_SetListTerm;
	backgroundPage.Terminology_LoadGlobal       = Terminology_LoadGlobal;
	backgroundPage.Terminology_LoadList         = Terminology_LoadList;
	backgroundPage.Terminology_LoadModule       = Terminology_LoadModule;
	backgroundPage.Terminology_LoadCustomList   = Terminology_LoadCustomList;
	// Application.js
	backgroundPage.Application_Modules          = Application_Modules;
	backgroundPage.Application_Config           = Application_Config;
	backgroundPage.Application_Teams            = Application_Teams;
	// DetailViewRelationships.js
	backgroundPage.DetailViewRelationships_LoadLayout = DetailViewRelationships_LoadLayout;
	// TabMenu.js
	backgroundPage.TabMenu_Load                 = TabMenu_Load;
	// ListView.js
	backgroundPage.ListView_LoadModule          = ListView_LoadModule;
	backgroundPage.ListView_LoadLayout          = ListView_LoadLayout;
	// DetailView.js
	backgroundPage.DetailView_LoadItem          = DetailView_LoadItem;
	backgroundPage.DetailView_LoadLayout        = DetailView_LoadLayout;
	// EditView.js
	backgroundPage.EditView_LoadItem            = EditView_LoadItem;
	backgroundPage.EditView_LoadLayout          = EditView_LoadLayout;
	// DynamicButtons.js
	backgroundPage.DynamicButtons_LoadLayout    = DynamicButtons_LoadLayout;
	// ModuleUpdate.js
	backgroundPage.DeleteModuleItem             = DeleteModuleItem;
	backgroundPage.UpdateModule                 = UpdateModule;
}
catch(e)
{
	alert('chrome.js ' + e.message);
}


